#!/usr/bin/python
import sys

if len(sys.argv)<3:
	print 'Usage: python extract.py infile outfile'
	sys.exit()
skip=[60]
for x in range(7):
     skip.extend([120,120,120,121])
skip.extend([120,120,61])
day=0
y=0
days=245
o=open(sys.argv[2], 'w')
for line in open(sys.argv[1]):
     if day == skip[y]+days:
             day = 0
             y = y + 1
     elif day >= skip[y]:
             o.write(line)
     day = day + 1
o.close()
